package com.crm.custinfo.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.crm.custinfo.mapper.UserOperateRecordMapper;
import com.crm.custinfo.domain.UserOperateRecord;
import com.crm.custinfo.service.IUserOperateRecordService;

/**
 * 操作员分配记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-01-17
 */
@Service
public class UserOperateRecordServiceImpl implements IUserOperateRecordService 
{
    @Autowired
    private UserOperateRecordMapper userOperateRecordMapper;

    /**
     * 查询操作员分配记录
     * 
     * @param id 操作员分配记录主键
     * @return 操作员分配记录
     */
    @Override
    public UserOperateRecord selectUserOperateRecordById(Long id)
    {
        return userOperateRecordMapper.selectUserOperateRecordById(id);
    }

    /**
     * 查询操作员分配记录列表
     * 
     * @param userOperateRecord 操作员分配记录
     * @return 操作员分配记录
     */
    @Override
    public List<UserOperateRecord> selectUserOperateRecordList(UserOperateRecord userOperateRecord)
    {
        return userOperateRecordMapper.selectUserOperateRecordList(userOperateRecord);
    }

    /**
     * 新增操作员分配记录
     * 
     * @param userOperateRecord 操作员分配记录
     * @return 结果
     */
    @Override
    public int insertUserOperateRecord(UserOperateRecord userOperateRecord)
    {
        userOperateRecord.setCreateTime(DateUtils.getNowDate());
        return userOperateRecordMapper.insertUserOperateRecord(userOperateRecord);
    }

    /**
     * 修改操作员分配记录
     * 
     * @param userOperateRecord 操作员分配记录
     * @return 结果
     */
    @Override
    public int updateUserOperateRecord(UserOperateRecord userOperateRecord)
    {
        return userOperateRecordMapper.updateUserOperateRecord(userOperateRecord);
    }

    /**
     * 批量删除操作员分配记录
     * 
     * @param ids 需要删除的操作员分配记录主键
     * @return 结果
     */
    @Override
    public int deleteUserOperateRecordByIds(Long[] ids)
    {
        return userOperateRecordMapper.deleteUserOperateRecordByIds(ids);
    }

    /**
     * 删除操作员分配记录信息
     * 
     * @param id 操作员分配记录主键
     * @return 结果
     */
    @Override
    public int deleteUserOperateRecordById(Long id)
    {
        return userOperateRecordMapper.deleteUserOperateRecordById(id);
    }
}
